package com.zj.study.configuration;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

/**
 * @author 赵赳
 * @since 2021/8/25 11:32
 */
@Component
@ConfigurationProperties(prefix = "oss")
@Data
public class OssProperty {

  /**
   * OSS 类型
   */
  private OssType type = OssType.TENCENT_COS;

  /**
   * 存储桶名称
   */
  private String bucketName;

  /**
   * 区域
   */
  private String region;

  /**
   * 密钥 ID
   */
  private String secretId;

  /**
   * 密钥
   */
  private String secretKey;

  /**
   * 是否启用 https
   */
  private boolean enableHttps = true;

  public enum OssType {
    /**
     * 腾讯云 COS
     */
    TENCENT_COS
  }

}
